package com.hongchen.wechat.service;

import com.realdtech.base.ServiceSupport;
import com.hongchen.model.ActUser;

/**
 * Created by Administrator on 2018/3/1.
 */
public class HouseService extends ServiceSupport {
    ActUser wechatUser=new ActUser().dao();
    /**
     * 根据opeid查询WechatUse表数据
     * @param openid
     * @return
     */
    public ActUser openid(String openid){
        return wechatUser.findFirst("SELECT id,create_time,wechat_openid,wechat_nickname,head_img,sex,city,name,tel,category,update_time " +
                "FROM "+ActUser.TABLE_NAME+" where wechat_openid=?",openid);
    }

    /**
     * 根据id查找用户
     * @param id
     * @return
     */
    public ActUser wechat_id(String id){
        return wechatUser.findFirst("SELECT id,create_time,wechat_openid,wechat_nickname,head_img,sex,city,name,tel,category,update_time " +
                "FROM "+ActUser.TABLE_NAME+" where id=?",id);
    }

    @Override
    public void clearCache() {

    }

    @Override
    public void removeCache(Object... id) {

    }

    @Override
    public Object get(Object... id) {
        return null;
    }
}
